#pragma once

#include <QWidget.h>
#include "dynamictreewidgetitembase.h"
#include "actorbase.h"
#include "datatypedefine.h"

class QPushButton;
class QLabel;

namespace PublicGui
{
	class DynamicFileSelectWidget:public DynamicTreeWidgetItemBase
	{
		Q_OBJECT
	public:
		DynamicFileSelectWidget(const QString& filefilter,const QString& subfolder);
		~DynamicFileSelectWidget();
		virtual void setItemData(CoreBase::ActorBase* actorptr,const QString& tag);
		virtual QVariant getItemData();
		virtual void setLabelTextList(QStringList mtext);
	protected slots:
		void slotValueChanged(int);
		void slotsButtonClicked();
	protected:
		virtual void initializationUi();
		virtual void emitValueChanged();
		QPushButton*								_pushButton;
		QLabel*										_fileNameLabel;
		QString										_oldValue;
		QTreeWidgetItem*							_labelBtn;
		QTreeWidgetItem*							_labelLabel;
		QString										_fileFilter;
		QString										_subFolder;
	};
}